<?php include APP_ADMIN_VIEW . 'include/head.php';?>
<div class="cm-container-white">
    <h2 style="margin-top:0;">欢迎登录思想黑客博客系统</h2>
    <p>魔力博客系统是一套页面HTML静态化的博客系统，高性能，低要求低博客系统程序。</p>
</div>
                <div class="row">
                    <div class="col-md-6">
                        <div class="panel panel-default">
                            <div class="panel-heading">点击最多的文章</div>
                            <div class="panel-body">
                                <table class="table table-bordered table-hover">
                                <tr>
                                    <th>编号</th><th>标题</th><th>阅读数</th><th>评论数</th>
                                </tr>
                                <?php if ($post_array): ?>
                                <?php foreach ($post_array as $post_data): ?>
                                <tr>
                                    <td width="5%"><?php echo $post_data['id']; ?></td>
                                    <td width="20%">
                                        <a href="<?php echo isset($post_data['url']) ? $post_data['url'] : ''; ?>" target="_blank">
                                        <?php echo isset($post_data['title']) ? $post_data['title'] : ''; ?>
                                        </a>

                                        </td>
                                    <td width="5%"><?php echo isset($post_data['page_view_count']) ? $post_data['page_view_count'] : ''; ?></td>
                                    <td width="5%"><?php echo isset($post_data['comment_count']) ? $post_data['comment_count'] : ''; ?></td>
                                </tr>
                                <?php endforeach?>
                                <?php else: ?>
                                <tr>
                                    <td colspan="5">暂无数据</td>
                                </tr>
                                <?php endif?>
                                </table>
                            </div>

                    </div>
                </div>

                    <div class="col-md-6">
                        <div class="panel panel-default">
                            <div class="panel-heading">评论最多的文章</div>
                            <div class="panel-body">
                                <table class="table table-bordered table-hover">
                                <tr>
                                    <th>编号</th><th>标题</th><th>阅读数</th><th>评论数</th>
                                </tr>
                                <?php if ($post_comment_array): ?>
                                <?php foreach ($post_comment_array as $post_data): ?>
                                <tr>
                                    <td width="5%"><?php echo $post_data['id']; ?></td>
                                    <td width="20%">
                                        <a href="<?php echo isset($post_data['url']) ? $post_data['url'] : ''; ?>" target="_blank">
                                        <?php echo isset($post_data['title']) ? $post_data['title'] : ''; ?>
                                        </a>

                                        </td>
                                    <td width="5%"><?php echo isset($post_data['page_view_count']) ? $post_data['page_view_count'] : ''; ?></td>
                                    <td width="5%"><?php echo isset($post_data['comment_count']) ? $post_data['comment_count'] : ''; ?></td>
                                </tr>
                                <?php endforeach?>
                                <?php else: ?>
                                <tr>
                                    <td colspan="4">暂无数据</td>
                                </tr>
                                <?php endif?>
                                </table>
                            </div>

                    </div>
                </div>
            </div>
<script src="/static/admin/js/demo/home.js"></script>
<?php include APP_ADMIN_VIEW . 'include/foot.php';?>